/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package listener;

import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

/**
 * Web application lifecycle listener.
 * @author Yasith
 */

public class httpSessionListener implements HttpSessionListener {

    private static int sessionCount=0;

    public static int getSessionCount() {
        return sessionCount;
    }
    
    public void sessionCreated(HttpSessionEvent arg0) {
        sessionCount+=1;
    }

    public void sessionDestroyed(HttpSessionEvent arg0) {
        sessionCount-=1;
    }
}